package com.eqdd.yiqidian.gen;

/**
 * @author吕志豪 .
 * @date 18-2-23  上午9:17.
 * Github :https://github.com/lvzhihao100
 * E-Mail：1030753080@qq.com
 * 简书 :http://www.jianshu.com/u/6e525b929aac
 */


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import org.greenrobot.greendao.database.Database;


public class MigrationOpenHelper extends DaoMaster.OpenHelper {

    public MigrationOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    /**
     * 数据库升级
     *
     * @param db
     * @param oldVersion
     * @param newVersion
     */
    @Override
    public void onUpgrade(Database db, int oldVersion, int newVersion) {
        //操作数据库的更新 有几个表升级都可以传入到下面
        MigrationHelper.getInstance().migrate(db, GroupBeanDao.class,PushMsgDao.class,UserDao.class,
                YueArticleBeanDao.class,FriendListResultBeanDao.class,GroupListResultBeanDao.class);
    }

}